package com.hhx.androidrxmvp.mvp.model;

import android.content.Context;

import com.hhx.androidrxmvp.api.API;
import com.hhx.androidrxmvp.base.mvp.BaseModel;
import com.hhx.androidrxmvp.net.ObserverResponseListener;

import java.util.HashMap;

import javax.inject.Inject;

import io.reactivex.ObservableTransformer;

/**
 * Created by Administrator on 2018/7/20.
 */

public class LoginModel<T> extends BaseModel {

    public void login(Context context, HashMap<String, String> map, boolean isDialog, boolean cancelable,
                      ObservableTransformer<T, T> transformer, ObserverResponseListener responseListener) {
        subscribeLoading(context, API.getApiService().login(map), responseListener, transformer, isDialog, cancelable);
    }

    public void loginNormal(Context context, HashMap<String, String> map,
                            ObservableTransformer<T, T> transformer, ObserverResponseListener responseListener) {
        subscribeNormal(context, API.getApiService().login(map), responseListener, transformer);
    }

}
